home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 June / MacFormat 25.iso / Shareware City / Comms / MidiPhone ƒ / MidiPhone Docs.txt < prev    next >
Encoding:
Text File  |  1995-02-06  |  20.1 KB  |  256 lines  |  [TEXT/ttxt]

  1. MidiPhone Documentation
  2. by Mark Coniglio
  3.  
  4. © 1993 Mark F. Coniglio
  5. all rights reserved
  6.  
  7.  
  8.  
  9. The What It Are of What It Is...
  10. --------------------------
  11. MidiPhone is a shareware program that allows you to play music with a comrade who is hundreds, even thousands, of miles away. It does this by converting MIDI information coming from a keyboard, or sequencer program, into standard serial data that can be fed into a modem. This data is whisked off to your fellow musician, where his or her copy of MidiPhone translates the serial data back into MIDI and is then sent to an awaiting keyboard. In addition, you can send text messages back and forth by simply typing on the Macintosh keyboard. (Even when your playing!)
  12.  
  13. There are a few things you and your comrade will need use MidiPhone: a Macintosh, a MIDI Keyboard and a MIDI interface — items that musicians who work with the Macintosh are likely to have. The final component needed is a modem, hopefully one that can transmit at 9600 or more baud. (The time delay induced by 2400 baud modems may be problematic for live interaction.)
  14.  
  15. The What It Is of What It Was...
  16. ----------------------------
  17. This all started with a several concerts that I was involved with at the Electronic Cafe International™ in Santa Monica, California. Using the graphic programming language Interactor™ (developed by myself and composer Morton Subotnick) which supports processing of both MIDI and Serial data, we had performers in two cities play with one and other via the telephone. One of the first performances had composer Terry Riley (of In C fame) playing from Nice, France with composer David Rosenboom at the Electronic Cafe in California. The results were quite spectacular. (If you are interested in a powerful tool for interactive performance, Interactor is available from Interval Music Systems at 310-478-3956. Give them a call for info.) 
  18.  
  19. Subsequently, we did several more concerts using Interactor, but it was clear that the power it provided was much more than what was needed just to do these Tele-Music concerts. So, MidiPhone was born.
  20.  
  21. MidiPhone will be put given a hardcore workout during the months of September and October 1993, when the Electronic Cafe will be host several Tele-Music concerts, with musicians from cities throughout the U.S. participating. (If you are in the LA area, call the Electronic Cafe at 310-828-8732 for details.)
  22.  
  23. Special thanks to Dawn for reminding  me to eat, sleep, etc., while I hacked away, to Scott Morgan for helping me test MidiPhone, and to Kit and Sherrie at the Electronic Cafe and Richard Zvonar for encouraging me to whip it up.
  24.  
  25. Important Notes
  26. ---------------
  27. Modems (at least the ones in general use) can't transmit data as fast as MIDI can. When you're just playing notes, this is not much of a problem. But lots of controller data or long system exclusive messages can be problematic. See the section called Technical Details for more information about this.
  28.  
  29. Also, keep in mind that international calls almost always get sent via satellite. This is a big problem for two-way performances because the delay is significant, something like a quarter of a second. In the Riley-Rosenboom collaboration mentioned above, they made the delay part of the performance, but this of course is not always practical. (Though I feel that if you come up against the speed of light as a barrier, you're doing something right.) For local calls, the delay should not give you any trouble, though interstate calls can sometimes have more noticeable delays. If you have a bad delay, try calling again. It's pretty much the luck of the draw, but sometimes things will improve.
  30.  
  31. Known Bugs:
  32. ----------
  33. The current version of MidiPhone does not work on 660AV, 840AV or Power Macintoshes, and with powerbooks with internal modems. The reason for this is that I had to do some direct patching of interrupt vectors to get MidiPhone to work properly, and Macintoshes that use DMA Serial I/O just don’t dig it. This hacking also causes the problem on internal modem powerbooks. As of this date (Feb. 5, 1995) I have a working prototype of MidiPhone v0.6 which solves these problems, but it has not been thoroughly beta-tested. As soon as I can verify it on a variety of Macs, I will post to usual sites.
  34.  
  35. Advertisement
  36. -------------
  37. MidiPhone is shareware. It may be distributed freely as long as it is not modified and this documentation is included. Though it is shareware, it is not in the public domain. I retain the copyright to all code in this program.
  38.  
  39. I am a artist and composer: Need I say more about my financial state? (If you're using this program, you're probably in the same boat.) But if you use and enjoy this program (especially if you it is used for public performance) financial support is requested. Please honor the shareware concept and send $20 to:
  40.  
  41. Mark Coniglio
  42. 416 W. 23rd St. #3D
  43. New York, NY 10011
  44.  
  45. Also, comments and wise words are also appreciated. You can reach me via email at the following address:
  46.  
  47. troika@panix.com
  48.  
  49. Finally, for those interested in Interactive performance, I would encourage you to check out the WWW Page for Troika Ranch, a dance theater company directed by myself and choreographer Dawn Stoppeillo. Inside those pages, you can find our Geek Page (it can be found inside the page called The Technology.) I am attempting to build a resource of information on both hardware and software tools, tips, etc. that will be useful to artists. The Troika Ranch home page can be found at:
  50.  
  51. http://www.art.net/Studios/Performance/Dance/Troika_Ranch/TroikaHome.html
  52.  
  53. Before You Start
  54. ---------------
  55. MidiPhone requires the use of both of the Macintosh serial ports (modem and printer.) This means that while you are running MidiPhone, you cannot run any other applications that make use of the serial ports, like a communications program or a MIDI sequencer. In addition, Appletalk (which uses the printer port) must be inactive before you start up, as it uses the printer port.
  56.  
  57. If MidiPhone finds that one or both of the ports are busy, it will notify you of the problem and suggest possible solutions to the problem.
  58.  
  59. Setting Up Communications
  60. -------------------------
  61. The first time you load MidiPhone, after the startup information appears, you will see a the MIDI/Serial Setup dialog.
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. This is the where you configure both the Serial and MIDI input and output. Below you will find a description of what each of these settings does.
  80.  
  81. Midi Communications
  82. -------------------
  83. This option tells MidiPhone which port is connected to your MIDI interface. You may choose to send and receive MIDI via one of the following: the modem or printer ports, or via the MIDI Manager. 
  84. The MIDI Manager is an Apple program that allows several MIDI applications which are running simultaneously to talk to one and other. You will need a copy of the MIDI Manager and the accompanying Patchbay program to transmit music  from your a MIDI Manager compatible software sequencer using MidiPhone.
  85. Click on the appropriate radio button to choose an item. Note that when you choose Modem or Printer, the port choice under Serial Communications will automatically change to the opposite port. If you choose Midi Manger, the serial port will not automatically change because MidiPhone cannot know which port the Midi Manager is using. If you do use the Midi Manager, make sure that only one of the two ports (modem or serial) is on in the Apple Midi Driver. You will need the other port to talk to the modem.
  86.  
  87. Interface Speed
  88. ---------------
  89. Use this pop up menu to chose the speed of your Midi Interface: 0.5 MHz, 1.0 MHz and 2.0 MHz are available. 1 MHz is the most common. If you are using the Midi Manager, this option is not available because you set the interface speed using the Patchbay program supplied with the Midi Manager.
  90.  
  91. Serial Communications
  92. ---------------------
  93. This option tells MidiPhone which port is connected to your modem. You may choose either the Modem or Printer port. If you are not using the MIDI Manager, choosing a port here will cause the opposite port to be automatically selected under the MIDI Communications option.
  94.  
  95. Baud Rate
  96. ---------
  97. This pop up menu determines the speed at which MidiPhone will communicate with your modem. All of the standard baud rates are included. Note that, as mentioned above, the delay introduced by running at 2400 baud will probably be somewhat objectionable, though it can certainly be used. MIDI normally transmits at a rate of 31,250 baud, 13 times faster than 2400 baud, so there is quite a difference.
  98.  
  99. In general, this is the only setting you will have to adjust under the Serial Communications section. The Data Bits, Stop Bits, and Parity options are included for the sake of completeness only, and should be left to the default settings for normal operation.
  100.  
  101. Data Bits
  102. ---------
  103. Always leave this set to 8! (OK, then why did I include it? Just in case there is someone wacky enough to use MidiPhone as a lame terminal program and to find a system that does not use 8 bits.)
  104.  
  105. Stop Bits
  106. ---------
  107. There are three choices: 1, 1.5, and 2. Leave this set to 1.
  108.  
  109. Parity
  110. ------
  111. Three choices more choices: None, Even and Odd. MidiPhone does not do parity checking, so setting this to a value other than None is not really useful.
  112.  
  113. IMPORTANT: The Baud Rate, Data Bits, Stop Bits and Parity options you choose must exactly match the settings chosen by your comrade at the other end!
  114.  
  115. Hardware Handshake
  116. ------------------
  117. Some modems allow you to talk to the modem faster than the modem is actually talking to the other end, which facilitates hardware compression of the data. (i.e., the Mac talks to the modem at 38,400 while the modem talks to the other modem at 9600.) Doing this requires a special hardware handshaking cable. You can use this option if you want to try it and if you have the special cable. But be careful about compression! We have tried it and the general result, due to buffering of the data, is that the spacing of the notes is fouled up. (When I tested this, I played some quick, even eighth notes. On the other end, they came out as dotted eighths and sixteenths – e.g., sort of a compression induced auto-swing rhythm. Weird but not useful.)
  118.  
  119. Press the OK button when the settings are to your satisfaction. When you do press OK, MidiPhone will immediately attempt to initialize the MIDI drivers. If there is a problem in doing so, you will be notified by a dialog box. MidiPhone will not try to talk  to the modem until you try to place a call (see below.)
  120.  
  121. Editing the Phone Book
  122. --------------------
  123. MidiPhone includes a Phone Book which allows you to store the phone numbers that you use when placing a call. 
  124.  
  125. To add a name and number to the phone book:
  126.  
  127. • Choose Edit Phone Book... from the PhoneBook menu. You will see a dialog with an the following buttons: Add, Modify, Delete, OK and Cancel.
  128. • Press the Add button.
  129. • A new dialog will appear with a field for the name and a field for the phone number. Type the name and phone number into the appropriate text fields.
  130. • Press OK when you are finished.
  131. • The name and number are added to the phone book, and the name now appears under the word Dial in the PhoneBook menu.
  132.  
  133. Note that the phone number must start with a 1 if you are dialing long distance. You should only type numbers without any punctuation, except spaces.  (Certain characters like the comma, which causes a pause during the dialing sequence, have special meaning to the modem. Check your modem's manual for details.)
  134.  
  135. Once you have names in the Phone Book, you can modify them as follows:
  136.  
  137. • Choose Edit Phone Book... from the PhoneBook menu.
  138. • Select an name from the list by clicking on it.
  139. • Press the Modify button.
  140. • A new dialog will appear showing the current name and number
  141. • Edit the fields as needed.
  142. • Press OK when you are finished.
  143.  
  144. You can delete a name by:
  145.  
  146. • Choosing Edit Phone Book... from the PhoneBook menu. 
  147. • Select an name from the list by clicking on it.
  148. • Press the Delete button.
  149. • The item will be removed from the list.
  150.  
  151. Once you have added one or more names to the phone book, you are ready to place your first call.
  152.  
  153. Placing a Call
  154. MidiPhone has two windows: The main window shows you text that you type, text sent to you when connected to another musician,  and text sent when giving instructions to the modem. The second window (a windoid, actually) displays status information as well as showing MIDI and Serial activity on all 16 MIDI Channels. (The first row of nine indicators are MIDI channels 1-8, with the ninth indicator showing System Exclusive activity. The bottom row represents MIDI channels 9-16.)
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166. When you start, the status window will indicate that MidiPhone is Idle. In the idle state, characters you type on the keyboard will be sent to the Modem. If you like, try typing AT followed by a the return key. If everything is copacetic, the modem will reply with a friendly “OK.”
  167.  
  168. To place a call you should do this:
  169.  
  170. • The names you added to the phone book appear below the word dial in the PhoneBook menu. Choose a name from this list.
  171. • MidiPhone will make sure the Modem is On-Line. (If there is a problem, it will notify you that it can't talk to the modem. Make sure the modem is on the correct port.)
  172. • MidiPhone will dial the number that goes with the name you chose. You should see ATDT XXX-XXXX appear in the Main window, and a dialog will appear letting you know that MidiPhone is dialing the number. You should normally hear the modem dialing via its internal speaker.
  173. • You can press command period to cancel the call.
  174.  
  175. On the other end, your friend is anxiously awaiting your call. (Hopefully.) To receive the call, he or she needs to do the following:
  176.  
  177. • Choose Wait for Call from the Commands menu. A dialog will appear to let you know that MidiPhone is waiting for the phone to ring. When it does, MidiPhone will automatically answer it.
  178. • Or, if the phone is already ringing, choose the Answer Call, also under the Commands menu. MidiPhone will immediately answer the phone.
  179.  
  180. It will take a few moments for the modems to establish communication. When they do, you will see CONNECT XXXX appear in the main window, where XXXX is the baud rate of the connection.
  181.  
  182. Once MidiPhone sees the CONNECT message, it automatically goes switches into Midi Communications mode. The status display will show Midi Active.
  183.  
  184. At this point you should be able to hear your partner play his or her MIDI keyboard, and vice-versa. Look for activity on the indicators in the status display. If you can't hear anything, make sure and check the MIDI channels and synthesizer setup.
  185.  
  186. Also, letters you type on the Macintosh keyboard will be sent to your partner, and will appear in his or her Main window. This way, you can continue to communicate, even if you either person is playing.
  187.  
  188. If you are like many others, you will may have a sudden, inexplicable desire to play “Heart and Soul” with your partner. Resist this temptation if at all possible. (Trust me. I've seen it happen.)
  189.  
  190. When you are done playing, you can hang up the phone by choosing the Hang Up from the Commands menu. After hanging up, MidiPhone will return to the Idle state.
  191.  
  192. Troubleshooting
  193. ---------------
  194. The most common problem is that  MidiPhone can't get at the modem or serial port, or that it can't communicate with the modem.
  195.  
  196. Again, make sure that no applications that use the serial ports (like a communications program) are running when you start up MidiPhone. Also, make sure that Appletalk is off, as it ties up the Printer port.
  197.  
  198. You can always tell if there is a problem by looking at the Status window. If you see the message ‘Midi Off-Line’ or ‘Modem Off-Line’, you know that there was a problem hooking up to one of the ports.
  199.  
  200. More Options
  201. -----------
  202. - Midi Thru
  203. If your MIDI Interface doesn't have any MIDI through capabilities, choose the MIDI Thru option from the Communications menu. All MIDI information coming in to MidiPhone (except System Exclusive messages) will be echoed to the MIDI output.
  204.  
  205. - Set Modem Init String...
  206. This string is sent to your modem whenever MidiPhone hooks up. The default string is ATE1V1C0 (echo on, verbose result codes, compression off.) This is probably fine for most folks. You will need to consult your modem's manual for a list of command codes and what they do. Note that you should always start this string with AT. Be careful: you can get into loads of trouble with this if you are a novice.
  207.  
  208. - Activate/Deactivate Midi
  209. If like, you can turn the Midi Communication  mode on and off during a call. If Midi Communication is active, this option will appear as Deactivate Midi in the Commands menu. When you choose it, the status display will show Connected. At this point, characters you type on the Macintosh keyboard are sent directly to the modem and input from MIDI is turned off, i.e., MidiPhone becomes the world's weakest terminal program.
  210.  
  211. If you're comrade doesn't also choose Deactivate Midi and continues to play, you will see many unusual and wonderful characters appear in the Main window, because MidiPhone no longer knows what to do with the encoded MIDI data.
  212.  
  213. You can switch back to Midi Communication by choosing Activate Midi from the communications menu.
  214.  
  215. This command is useful if you have typed the dialing commands (ATDT...) directly, without using the PhoneBook. After you see the CONNECT XXXX message, choose Activate Midi to go allow MIDI communications.
  216.  
  217. Technical Notes
  218. ---------------
  219. - System Exclusive
  220. MidiPhone can handle all types of MIDI messages, including system exclusive. Potentially you could dump patches out of your synth and they would be sent to your partner. However care must be taken that the input buffers in MidiPhone do not get overrun. Remember, at 9600 baud you are transmitting to the other person at about one third the speed of MIDI. Long system exclusive messages can potentially fill the input buffer, so take care when using sys-ex. (The input buffers are 2048 bytes long.) 
  221.  
  222. - Controller-Mania
  223. The same warning applies if you like to sent LOTS of controller information. Again, the buffers are only so big and modems can only transmit so fast. Someday we'll all have ISDN 56 Kilobit lines and we won't have to worry about this. Until then...
  224.  
  225. - Compression
  226. As mentioned earlier, using the a modem's hardware compression mechanism when playing with a partner live usually leads to distortion of the timing of the notes. This is because the modem is buffering the data, waiting for a large chunk of data so that its compression algorithm can get the most bang for the buck. It may be OK if you are trying to send long sys-ex messages, but I can not vouch for this. (If you try this one out, email me with your results.)
  227.  
  228. - Midi Manager
  229. To use the Midi Manager with MidiPhone, you will need to make sure it is set up properly and that the correct connections in the Patchbay program have been made. First, make sure that the Apple Midi Driver is set to use only the one serial port that will not be used by the modem. (Double-click on the A.M.D. icon to configure the ports.) Then, connect the output of MidiPhone to the input of the Apple Midi Driver, and the output of the Apple Midi Driver to the input of MidiPhone.
  230.  
  231. Consult your Midi Manager documentation for more information on the Patchbay program.
  232.  
  233. How Typed Characters Are Transmitted
  234. When you type during a session, the Macintosh characters are encoded into short system exclusive messages in the following format:
  235.  
  236. (Hex)  F0 00 cc F7 where cc is the character you typed.
  237.  
  238. These messages are merged into the MIDI data coming from your keyboard and are decoded at the other end, and the character appears on the other user's Main window.
  239.  
  240. The top bit of the character must be stripped off so that the letter is not interpreted as a command byte. This is only a problem for special characters that are not in the ASCII character set.
  241.  
  242. This sys-ex message will never be passed on to the MIDI output.
  243.  
  244. A Few Things for the Future
  245. -------------------------
  246. To whet your appetite, here are a few things I intend to add to MidiPhone:
  247.  
  248. • The ability to record a session and export it as a Standard MIDI File
  249.  
  250. • A function to measure the time delay of the telephone line. Useful if you are doing international calls and trying get lucky with a land line for shorter delay times.
  251.  
  252. • I'll be working with Kit and Sherrie at the Electronic Cafe to attempt to allow MidiPhone to communicate over the ISDN lines (56,000 bits per second – almost twice the speed of MIDI !!) that they recently had installed.
  253.  
  254.  
  255.  
  256.